<?php
	####################################################
	# library import and object instance.              #
	####################################################
	# 커먼 인클루드
	include_once( './common.php' );

	####################################################
	# request data($_POST AND $_GET FROM $_REQUEST)    #
	####################################################
	# REQUEST(get and post variables)
	//$req = $_REQUEST;
	//$req = Request::clean_request($_REQUEST, 1);

	# GET(url variables)

	# POST(form variables)
	$pmode = Request::clean_individual($_POST['mode']);
	$preturl = Request::clean_individual($_POST['returl']);
	//Nlog::put('pmode',$pmode);
	//Nlog::put('preturl',$preturl);
	//$pdic = NForm::dictionary($p, 'puid');

	Mover::redirect_msg('./ntdd.redirect.test','test');

	# Validation(special case validate)
	/*/
	Validation::check_is_emptys($pmode);
	Validation::check_is_emptys($preturl);
	//*/
	####################################################
	# implementation                                   #
	####################################################
	$sec->run();

	switch($pmode) {
		case "modify":
			$pmap = Request::dic($_POST['map'], 'muid');
			$cnt = $appm->modify_modules($pmap);
			//Nlog::put('pmap', $pmap);
		break;

		case "create":
			$pmap = $_POST['map'];
			$cnt = $appm->create_modules($pmap);
			//Nlog::put('pmap', $pmap);
		break;

		case "delete":
			$pmap = Request::dic($_POST['map'], 'muid');
			$cnt = $appm->delete_modules($pmap);
			//Nlog::put('pmap', $pmap);
		break;

		case "linkage":
			$pmap = $_POST['map'];
			$pmuid = Request::clean_individual($_POST['muid']);
			//Nlog::put('pmap', $pmap);
			//Nlog::put('pmuid', $pmuid);
			$cntarr = $appm->linkage_packages($pmuid, $pmap);
		break;
		default : break;
	} //endswitch


?>